export default {
  data() {
    return {
      ruleForm: {
        title: "",
        contacts: "",
        contactNumber: "",
        financeType: "",
        financeOtherDesc: "",
        appealReason: "",
        fileBatchId: "",
      },
      rules: {
        title: [{ required: true, message: "请填写诉求名称", trigger: "blur" }],
        contacts: [
          { required: true, message: "请填写联系人", trigger: "blur" }
        ],
        contactNumber: [
          {
            required: true,
            trigger: "blur",
            validator: (rule, value, callback) => {
              if (!this.regCheck('empty', value)) {
                callback(new Error("请输入电话号码"));
              } else if (this.regCheck('phone', value)) {
                callback(new Error("请输入正确的电话号码"));
              } else {
                callback();
              }
            },
          },
        ],
        financeType: [
          { required: true, message: "请填写联系电话", trigger: "change" },
        ],
        appealReason: [
          { required: true, message: "请填写诉求原因", trigger: "change" },
        ],
      }
    }
  }
}
